/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.aliyuncs.gpdb.model.v20160503;

import com.aliyuncs.RpcAcsRequest;
import java.util.List;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.gpdb.Endpoint;

/**
 * @author auto create
 * @version 
 */
public class UnbindDBResourceGroupWithRoleRequest extends RpcAcsRequest<UnbindDBResourceGroupWithRoleResponse> {
	   

	private String resourceGroupName;

	private String dBInstanceId;

	private Long ownerId;

	private List<String> roleList;
	public UnbindDBResourceGroupWithRoleRequest() {
		super("gpdb", "2016-05-03", "UnbindDBResourceGroupWithRole", "gpdb");
		setMethod(MethodType.POST);
		try {
			com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
			com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
		} catch (Exception e) {}
	}

	public String getResourceGroupName() {
		return this.resourceGroupName;
	}

	public void setResourceGroupName(String resourceGroupName) {
		this.resourceGroupName = resourceGroupName;
		if(resourceGroupName != null){
			putQueryParameter("ResourceGroupName", resourceGroupName);
		}
	}

	public String getDBInstanceId() {
		return this.dBInstanceId;
	}

	public void setDBInstanceId(String dBInstanceId) {
		this.dBInstanceId = dBInstanceId;
		if(dBInstanceId != null){
			putQueryParameter("DBInstanceId", dBInstanceId);
		}
	}

	public Long getOwnerId() {
		return this.ownerId;
	}

	public void setOwnerId(Long ownerId) {
		this.ownerId = ownerId;
		if(ownerId != null){
			putQueryParameter("OwnerId", ownerId.toString());
		}
	}

	public List<String> getRoleList() {
		return this.roleList;
	}

	public void setRoleList(List<String> roleList) {
		this.roleList = roleList;	
		if (roleList != null) {
			String roleListArrVal = "";
			for(int depth1 = 0; depth1 < roleList.size(); depth1++) {
				roleListArrVal += roleList.get(depth1) + ",";
			}
			if (roleListArrVal.length() > 0) {
				roleListArrVal = roleListArrVal.substring(0, roleListArrVal.length() - 1);
			}
			putQueryParameter("RoleList" , roleListArrVal);
		}	
	}

	@Override
	public Class<UnbindDBResourceGroupWithRoleResponse> getResponseClass() {
		return UnbindDBResourceGroupWithRoleResponse.class;
	}

}
